{extend name="base" /}
{block name="content"}
<div class="iframe_div layui-anim layui-anim-upbit">
    <div class="top_btn_tool">
        {if power('shop_create','创建商品','shop')}
        <button class="layui-btn" data-type="create_btn">新增</button>
        {/if}
    </div>
    <div class="clear link_15"></div>
    <fieldset>
        <legend>条件筛选</legend>
        <form class="layui-form layui-form-pane form-search" action="" lay-filter="search_form">
            <div class="layui-form-item layui-inline">
                <label class="layui-form-label">模糊搜索</label>
                <div class="layui-input-inline" style="width: 120px">
                    <input type="text" name="key" value="" autocomplete="off" placeholder="模糊搜索" class="layui-input">
                </div>
            </div>
            <button class="layui-btn search_btn" lay-submit="" lay-filter="search_sub_item">搜索</button>
        </form>
    </fieldset>

    <div class="table_div">
        <table class="layui-hide" id="table_list" lay-filter="table_list"></table>
    </div>
</div>
{/block}
{block name="script"}
<script>
    layui.config({
        base: '<?php echo SITE;?>static/layuiadmin/'
    }).extend({
        index: 'lib/index'
    }).use(['index'],async () => {
        const { layer,form, admin, table, $,element,upload } = layui;

        /*渲染表格*/
        let table_list = table.render({
            elem: '#table_list'
            ,url:'list'
            ,page:true
            ,limit:15
            ,cols: [[
                {field:'id', width:80, title: 'ID'}
                ,{field:'title', title: '名称'}
                ,{field:'price', width:100, title: '价格'}
                ,{field:'pay_date', width:100, title: '可缴费日期'}
                ,{field:'column_name',width:120, title: '分类'}
                ,{field:'frozen',width:120, title: '是否上架'}
                ,{toolbar: '#barDemo',width:140, title: '操作'}
            ]]
        });
    });
</script>
{/block}

{block name="template"}
{include file="shop/template" /}
{/block}